<%@ page import="com.hyy.bean.MaskUser" %>
<%@ page import="com.hyy.bean.Merchandise" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <meta charset="UTF-8">
        <title>修改个人信息</title>
		<!-- 新 Bootstrap 核心 CSS 文件 -->
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
		<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
		<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

	</head>
    <body>
        <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header">
					<a class="navbar-brand" href="/merchandiseList">
						<span class="glyphicon glyphicon-arrow-left"
							  aria-hidden="true"></span>返回商品管理首页
					</a>
                </div>
            </div>
        </nav>
        <div class="container">
            <div class="jumbotron">
                <p>请斟酌后修改</p>
            </div>
            <div class="page-header">
                <h3><small>商品信息</small></h3>
            </div>
			<% Merchandise merchandise =  (Merchandise) request.getAttribute("merchandise");%>
			<form class="form-horizontal" action="/updateProduct" method="post">
				<div class="form-group">
					<label for="mid" class="col-sm-2 control-label">编号 ：</label>
					<div class="col-sm-6">
						<input name="mid" class="form-control" id="mid" value="<%=merchandise.getId()%>"
							   readonly>
					</div>
				</div>
				<div class="form-group">
					<label for="productname" class="col-sm-2 control-label">商品名 ：</label>
					<div class="col-sm-6">
						<input name="productname" class="form-control" id="productname" value="<%=merchandise.getProductName()%>">
					</div>
				</div>
				<div class="form-group">
					<label for="price" class="col-sm-2 control-label">单价 ：</label>
					<div class="col-sm-6">
						<input name="price" class="form-control" id="price" value="<%=merchandise.getPrice()%>">
					</div>
				</div>
				<div class="form-group">
					<label for="stock" class="col-sm-2 control-label">库存 ：</label>
					<div class="col-sm-6">
						<input name="stock" class="form-control" id="stock" value="<%=merchandise.getStock()%>">
					</div>
				</div>
				<div class="form-group">
					<label for="sales" class="col-sm-2 control-label">销量 ：</label>
					<div class="col-sm-6">
						<input name="sales" class="form-control" id="sales" value="<%=merchandise.getSales()%>">
					</div>
				</div>
				<div class="form-group">
					<label for="category" class="col-sm-2 control-label">类别 ：</label>
					<div class="col-sm-6">
						<input name="category" class="form-control" id="category" value="<%=merchandise.getCategoryid()%>">
					</div>
				</div>
				<div class="form-group">
					<label for="img" class="col-sm-2 control-label">商品图片路径 ：</label>
					<div class="col-sm-6">
						<input name="img" class="form-control" id="img" value="<%=merchandise.getImg()%>">
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-primary">保存</button>&nbsp;&nbsp;&nbsp;
					</div>
				</div>
			</form>
        </div>
		<hr/>
        <footer class="text-center" >
            谨慎修改
        </footer>
    </body>
</html>
